<template>
  <div class="back-wrapper">
    <div class="back-box color-white flex-h">
      <div class="left" @click="goback">
        <img class="imgIcon" src="~/static/iconsvgs/top_icon_back.png" alt />
        <span class="backTxt">返回</span>
      </div>
      <div class="center flex1">
        <slot name="my-center"></slot>
      </div>
      <div class="right"><slot name="my-right"></slot></div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
  },
  data() {
    return {
    };
  },
  methods: {
    goback() {   
        this.$router.back();
    },
  }
};
</script>


<style scoped lang="less">
.back-box {
  width: 7.5rem;
  height: 0.8rem;
  line-height: 0.8rem;
  padding: 0 0.3rem;
  box-sizing: border-box;
  z-index: 10000;
  position: relative;
  .left,
  .right {
    width: 1.2rem;
  }
  .left {
    .imgIcon,
    .backTxt {
      vertical-align: middle;
      display: inline-block;
    }
    .backTxt {
      margin-left: 0.1rem;
      font-weight: bold;
      color: #222;
    }
  }
  .center {
    text-align: center;
    font-size: 0.36rem;
    font-family: PingFangSC;
    font-weight: 600;
    color: rgba(34, 34, 34, 1);
  }
     .imgIcon {
      width: 0.4rem;
      height: 0.4rem;
    }
}
.color-white {
  background: #fff;
}
</style>
